package com.battery.system.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.battery.common.annotation.Excel;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 设备状态对象 ws_device_status
 *
 * @author battery
 * @date 2021-01-22
 */
@Table(name = "ws_device_status")
public class DeviceStatus {
    private static final long serialVersionUID = 1L;

    /**
     * 对应设备ID
     */
    @Id
    @KeySql(useGeneratedKeys = true)
    private String deviceId;

    /**
     * 设备状态 0 待划分 1 待部署 2 已部署
     */
    @Excel(name = "设备状态 0 待划分 1 待部署 2 已部署")
    private Integer deviceStatus;

    /**
     * 设备入库时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "设备入库时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    /**
     * 设备划分时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "设备划分时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date divideTime;

    /**
     * 部署时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "部署时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deployTime;

    /**
     * 闲置时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "闲置时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date asideTime;


    private Date recoveryTime;

    public Date getRecoveryTime() {
        return recoveryTime;
    }

    public void setRecoveryTime(Date recoveryTime) {
        this.recoveryTime = recoveryTime;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceStatus(Integer deviceStatus) {
        this.deviceStatus = deviceStatus;
    }

    public Integer getDeviceStatus() {
        return deviceStatus;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setDivideTime(Date divideTime) {
        this.divideTime = divideTime;
    }

    public Date getDivideTime() {
        return divideTime;
    }

    public void setDeployTime(Date deployTime) {
        this.deployTime = deployTime;
    }

    public Date getDeployTime() {
        return deployTime;
    }

    public void setAsideTime(Date asideTime) {
        this.asideTime = asideTime;
    }

    public Date getAsideTime() {
        return asideTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("deviceId", getDeviceId())
                .append("deviceStatus", getDeviceStatus())
                .append("createdTime", getCreatedTime())
                .append("divideTime", getDivideTime())
                .append("deployTime", getDeployTime())
                .append("asideTime", getAsideTime())
                .toString();
    }
}
